package Alogorithm;

import java.util.Scanner;

public class Client {
    public static void main(String[] args) {
        int a[]={20,10,50,40,30,70,60,80,90,100};
        System.out.println("-----------------请选择要排序的方法----------------");
        System.out.println("-----------------1、选择排序-----------------------");
        System.out.println("-----------------2、冒泡排序-----------------------");
        System.out.println("-----------------3、插入排序-----------------------");
        System.out.println("-----------------4、快速排序-----------------------");
        System.out.println("-----------------5、归并排序-----------------------");
        System.out.println("---------------------------------------------------");
        Scanner sc=new Scanner(System.in);
        if(sc.hasNextInt())
        {
            switch(sc.nextInt())
            {
                case 1:
                    SelcetSort.sort(a);break;
                case 2:
                    BubbleSort.sort(a);break;
                case 3:
                    InserSort.sort(a);break;
                case 4:
                     Quitsort.Sort(a);break;
                case 5:
                    MergingSort.Sort(a);break;
            }
        }
    }
}
